package com.mall.common.exception;

import java.util.Map;

/**
 * @author: 谢君臣
 * @Date: 2022/7/22-10:01
 * @version: 1.0
 * @function:
 */
public class ValidationException extends RuntimeException{
    private final int code = HttpStatusCode.VALID_EXCEPTION.getCode();
    private String msg;
    private Map<String,String> data;

    public ValidationException(String message) {
        super(message);
        this.msg = message;
        this.data = null;
    }
    public ValidationException(String message, Map<String,String> data) {
        super(message);
        this.msg = message;
        this.data = data;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public Map<String, String> getData() {
        return data;
    }

    public void setData(Map<String, String> data) {
        this.data = data;
    }
}
